<?php
include('../../include/functions.inc.php');
include('../../include/report.inc.php');
$report=new Report;
$report= unserialize($_SESSION[$report->sessionName]);
$report->dbManager=$db;
if(getParam("flag")!=null || $report->ajax || $report->preLoaded){ //si hay submit o es ajax request
    $report->load();    
}
if(!$report->ajax){
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php echo $report->titulo; ?></title>
<link href="../../css/ContentStyle.css" rel="stylesheet" type="text/css" />
<link href="../../css/tablereportes.css" rel="stylesheet" type="text/css" />
<link href="../../css/reports.css" rel="stylesheet" type="text/css" />
</head>

<body>
<?php if($report->requireFilter){ ?>
<div id="filter"><form id="report" name="report" method="GET" action="report.php">
<input  type="hidden" name="flag" value="do"/>
  <table class="tableform"  width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
      <th scope="col"><?php echo $report->titulo; ?></th>
      </tr>
    <tr>
      <td>
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
              <?php echo $report->buildFields(); ?>
      </table>
      </td>
    </tr>
    <tr>
      <td><input name="buscar" type="submit" class="boton" id="1" onClick="datosEstud(this);" value="Buscar" /></td>
    </tr>
  </table>
</form></div>&nbsp;
<?php }?>
<?php }?>
    <?php
	//echo $report->sql;
    echo $report->buildTable("", "", ""); ?>

<?php if(!$report->ajax){?>
</body>
</html>
<?php }?>